<template>
  <div class="prod" v-for="item in data.prodlist" :key="item">
    <div class="img">
      <img :src="item.prodimg" alt="" />
    </div>
    <div class="view">
      <p class="title">{{ item.title }}</p>
      <p class="desc">{{ item.desc }}</p>
      <span class="score">8.0</span>
      <img :src="item.star" alt="" />
      <span class="count">(1130人评分)</span>
      <p class="price">美国 ·￥140/ 15ml</p>
    </div>
  </div>
</template>

<script>
import { reactive } from "vue";
export default {
  setup() {
    const data = reactive({
      prodlist: [
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
        {
          prodimg: "http://121.40.124.132:3000/images/search/chanpin.png",
          title: "洛克RoC维A抗皱眼霜",
          desc: "RoC Retinol Correxion Eye Cream",
          star: "http://121.40.124.132:3000/images/search/xing.png",
        },
      ],
    });
    return {
      data,
    };
  },
};
</script>

<style lang="less" scoped>
.prod {
  padding: 12px 16px 15px;
  border-bottom: 1px solid #eee;
  .img {
    display: inline-block;
    margin-right: 12px;
  }
  .view {
    display: inline-block;
    .title {
      font-size: 16px;
      font-weight: 900;
      line-height: 30px;
    }
    .desc {
      font-size: 1px;
      color: #999;
      line-height: 16px;
    }
    .score {
      font-size: 14px;
      color: #68dcdc;
      line-height: 24px;
      margin-right: 8px;
    }
    .count {
      font-size: 14px;
      color: #666;
      margin-left: 16px;
    }
    .price {
      font-size: 1px;
      color: #999;
    }
  }
}
</style>
